1. Field of the Invention
The invention relates to a media access controller (MAC) for a cable modem, and particularly a method for recovering a global timing reference from a plurality of timestamps periodically transmitted from a cable modem termination system (CMTS).
2. Description of Related Art
Traditional modems provide point-to-point communications between data communications equipment (DCE) and data terminal equipment (DTE) over relatively long distances at transmission rates ranging from 28 kbit/sec to about 50 kbit/sec. In contrast, Ethernet or local area network (LAN) connections, with typical transmission rates ranging from tens to hundreds of megabits per second, provide multipoint communications where all data terminals (e.g., terminals, PCs, hosts) attached to the network can communicate with all other data terminals over relatively short distances (typically less than 1 km).
A cable modem offers something in between. A cable modem provides point-to-multipoint communication over ordinary cable TV (CATV) networks. Most CATV networks are hybrid fiber-coax networks, in which the TV signals are initially transmitted over fiber-optical cables from a head-end to a location near the subscriber, whereupon the TV signals are re-transmitted over coaxial cables which run to the subscribers"" premises. While CATV networks typically transmit signals only in one direction from the provider to the subscriber, amplifiers in the network can be upgraded to permit bidirectional communication between the provider and the subscriber. Cable modems connected to such networks thus enable subscribers to transmit data to and receive data from the provider.
Cable modems typically have speeds of 3 Mbit/sec to 50 Mbit/sec and can operate over distances of over 100 km. FIG. 1 illustrates a typical cable modem system 100. A head end 110 includes a cable modem termination system (CMTS) 120, which is connected to cable modems (CMs) 130, 140, and 150 over an all-coaxial or hybrid fiber-coax (HFC) network. Cable modems 130, 140, and 150 are in turn connected to customer-premise-equipment, for example, personal computers (PCs), 160, 170, and 180, respectively. While data can flow between CMTS 120 and each of the attached PCs, data cannot flow between individual PCs unless the data has been first been relayed to CMTS 120. CMTS 120 can typically drive about 1000 simultaneously connected cable modem subscribers on a single TV channel.
To date, several competing cable modem standards exist. The Multimedia Cable Network Systemsxe2x80x94Data Over Cable Service Interface Specification (MCNS-DOCSIS 1.1 Interim Specification, SP-RFIv1.1-I01-990311), hereby incorporated by reference, is the predominant cable modem standard in the United States. In Europe, EuroDOCSIS and DVB/DAVIC (also known as DVB-RCC) are vying for dominance. IEEE is also working on standardizing the next generation physical layer for cable modems capable of upstream bit rates of approximately 30 Mbit/sec.
Several cable modem configurations are available to subscribers. Subscribers can purchase external cable modems, internal cable modems, or interactive set-top boxes. An external cable modem is typically connected to either an Ethernet connection or a universal serial bus (USB) connection. While the Ethernet option permits more than one PC to access the cable modem, it requires that each PC be equipped with an internal Ethernet card. On the other hand, the USB option is easy to install but it can only accommodate one PC per cable modem. Internal cable modems are typically inexpensive peripheral component interconnect (PCI) bus add-on cards that are normally used only in desktop PCs. Finally, interactive set-top boxes are essentially cable modems that provide a return channel, often through a plain old telephone system (POTS), that allows the subscriber to browse the web and send email directly from a TV screen, for example.
Despite these differences, all cable modems essentially share the same architecture. FIG. 2 illustrates the basic cable modem architecture. This architecture defines a cable tuner 210, diplexer 215, demodulator 220, media access controller (MAC) 230, burst modulator 240, interface 250, microprocessor 260, and memory 270. Tuner 210 connects directly to the CATV outlet and typically includes diplexer 215. Diplexer 215 permits signals to be transmitted downstream from the CMTS to the PC and upstream from the PC to the CMTS.
In the downstream direction, CATV signals are transmitted to the cable modem via tuner 210. Tuner 210 converts the CATV signals to a lower frequency (e.g., approximately 6-44 MHZ) and this intermediate frequency (IF) signal feeds demodulator 220. Demodulator 220 performs analog-to-digital (A/D) conversion, demodulation using 64 or 256 quadrature amplitude modulation (QAM-64/256), Reed-Solomon error correction, and moving picture experts group (MPEG) frame synchronization. The output of demodulator 220 feeds MAC 230. MAC 230 can be implemented in hardware or a combination of hardware and software and typically operates in conjunction with an external microprocessor 260 and memory 270. The output of MAC 230 feeds interface 250 such as Ethernet, IEEE 1394, USB, or PCI and is ultimately received by an external PC 280. Data in the downstream direction are received in continuous streams and are received by all active cable modems on the system.
In the upstream direction, data passes through interface 250 and is fed to MAC 230. MAC 230 performs a ranging process to compensate for different cable losses and delays. Specifically, the ranging process provides (1) a time offset by which to offset frame transmission so that frames arrive at the expected mini-slot (time slot) at the CMTS; (2) the relative change in the transmission power level that the CM is to make in order that the transmissions arrive at the CMTS at the desired power level; and (3) the relative change in the transmission frequency that the CM is to make in order to better match the CMTS. Burst modulator 240 performs Reed-Solomon encoding, scrambling, preamble prepending, quadrature phase shift keying/quadrature amplitude modulation (QPSK/QAM-16) and, digital-to-analog (D/A) conversion. The output of burst modulator 240 typically passes through a driver (not pictured) with a variable output level to compensate for any cable losses before being supplied to tuner 210. The data is then passed through diplexer 215 and transmitted to CMTS 120.
As upstream data transmission occurs in bursts, active modems on the system are all able to transmit on the same frequency in accordance with the time division multiple access (TDMA) protocol. This upstream transmission frequency typically ranges from 5-65 MHZ (or 5-42 MHZ) and the bandwidth per channel is typically 2 MHZ for a 3 Mbit/sec (xcx9c400 kB/sec) QPSK channel. Each active modem transmits bursts of data in time slots designated as reserved or contention. A reserved slot denotes a time slot allocated to a specific cable modem. A contention slot is accessible by all active cable modems and is typically used for very short data transmissions. If two active cable modems transmit using the same contention slot, a collision occurs and the data is lost.
In accordance with the TDMA protocol, the timing and synchronization between the cable modem and the CMTS is critical for upstream data transmission to the prevent collisions and the ensuing loss of data. DOCSIS 1.1 Interim Specification requires that the cable modem must thus be able to precisely time its transmissions to arrive at the CMTS at the start of the assigned mini-slot within 0.25 xcexcsec plus xc2xd symbol (i.e., approximately 0.44 xcexcsec at the highest symbol rate). The CMTS facilitates this synchronization by periodically sending to the active cable modem a ranging offset and a global timing reference. The ranging offset approximates the round trip cable delay between the active cable modem and the CMTS. The global timing reference is contained within a 32-bit timestamp that is subject to timestamp jitter and an uncertainty in transmission delay between the active cable modem and the CMTS.
FIG. 3 illustrates a simplified prior art system 300 for recovering the global timing reference from the 32-bit timestamps received periodically from the CMTS. The prior art system employs a local 32-bit clock counter 330, a signal processing block 310, and a voltage-controlled oscillator (VCXO) 320. The output of local clock counter 330 and the 32-bit timestamp are supplied to signal processing block 310 which compares the two signals and generates a voltage signal representative of the difference between the timestamp and the output of local clock counter 330. Depending on the magnitude of this voltage signal, VCXO 320 adjusts the clock frequency of local clock counter 330 to synchronize the count of local clock counter 330 with the global timing reference derived from previously received timestamps. Most of the discrepancies between the frequency of the CMTS master clock and the local clock are thus eliminated.
This prior art system continually adjusts the actual frequency of local clock counter to synchronize it with that of the CMTS master clock. Consequently, the CM can derive the global timing reference by adding the ranging offset to the current count. This synchronization of the local clock counter enables the cable modem MAC to accurately schedule upstream transmissions to the CMTS within the allocated time slots. This prior art system accurately synchronizes the clock frequency of the MAC""s local clock counter to that of the CMTS master clock, and, with the assistance of the ranging offset, permits the MAC to accurately time its upstream data transmissions.
While accurate, voltage-controlled oscillators are typically very expensive and can significantly increase the cost of the cable modem. Moreover, voltage-controlled oscillators require accompanying analog control circuitry that can significantly increase the complexity of the cable modem. Accordingly, there is a need for a simplified and more cost effective system and method of recovering a global timing reference from a plurality of timestamps periodically transmitted from the CMTS.
Timestamps,are periodically sent by a cable modem termination system to all active cable modems. According to the invention, roughly described, at least one timestamp received and a corresponding count of a first local clock counter are stored in a memory. A first timestamp of the at least one timestamp received is stored in a second local clock counter. A plurality of adjustment values based on the timestamps and the outputs of the first and second local clock counters are computed using a least square estimation algorithm when an interrupt condition is satisfied. The local count of the second local clock counter is periodically adjusted by the adjustment values to synchronize the second local clock counter to the global timing reference.